﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Commands
{
    public interface IUndoCommands
    {
        /// <summary>
        /// Get the undo commands history.
        /// </summary>
        Stack<IUMLCommand> UndoCommands { get; }

        /// <summary>
        /// Get the redo commands history.
        /// </summary>
        Stack<IUMLCommand> RedoCommands { get; }

        /// <summary>
        ///  Gets a value indicating whether there is anything that can be undone.
        /// </summary>
        bool CanUndo { get; }

        /// <summary>
        /// Gets a value indicating whether there is anything that can be rolled forward.
        /// </summary>
        bool CanRedo { get; }

        /// <summary>
        /// This method puts the command to the Undo stack and then executes it.
        /// </summary>
        /// <param name="command">The command to be executed.</param>
        void Execute(IUMLCommand command);

        /// <summary>
        /// Rollback the last command.
        /// </summary>
        void Undo();

        /// <summary>
        /// Rollback the last undone command.
        /// </summary>
        void Redo();

        /// <summary>
        /// Clear the undo history.
        /// </summary>
        void ClearUndoHistory();

        /// <summary>
        /// Clear the redo history.
        /// </summary>
        void ClearRedoHistory();

        /// <summary>
        /// Clear all the undo and redo history.
        /// </summary>
        void ClearHistory();
    }
}
